/**
 *
 * User: c3t
 * Date: 14-3-19
 * Time: 上午10:32
 */
define(function (require, exports, module) {
    var $ = require('js/lib/jquery');

    function openWin(f, n, w, h, s) {
        var sb = s == "1" ? "1" : "0";
        var l = (screen.width - w) / 2;
        var t = (screen.height - h) / 2;
        var sFeatures;
        if (!w) {
            sFeatures = "fullscreen=yes,center=1,scrollbars=1,status=0,directories=0,channelmode=0";
        } else {
            sFeatures = "left=" + l + ",top=" + t + ",height=" + h + ",width=" + w
                + ",center=1,scrollbars=" + sb + ",status=0,directories=0,channelmode=0";
        }
        var openwin = window.open(f, n, sFeatures);
    }

    $("#add_topic").click(function (event) {
        event.preventDefault();
        openWin('admin/topic/add', 'add_topic');
    });

    $("#search").click(function (event) {
        var con = $("#con").val();
        var cid = $("#cid").val();
        window.location = "admin/topic/unaudits?con=" + con + "&cid=" + cid;

    });
});
